home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 018a / macade.zip / BRINGBAK.DOC < prev    next >
Text File  |  1991-12-07  |  8KB  |  165 lines

  1.                            BringBak.wpm
  2.                Enables Information from an External
  3.               Process to be Imported into WordPerfect
  4.  
  5.                                 by
  6.  
  7.                       Jeffrey S. Kane, Ph.D.
  8.                 Performance Sciences International
  9.                           Summerfield, NC
  10.  
  11. 1.   Read the REGISTER.doc, LICENSE.doc, and WARRANTY.doc files distributed
  12.      with this macro.
  13.  
  14. 2.   Requires:
  15.      
  16.      A.   WordPerfect 5.1
  17.  
  18.      B.   Access to AutoBak.exe and USendBak.exe somewhere on the user's
  19.       system (i.e., on either a floppy or hard drive).
  20.  
  21. 3.   Features:
  22.  
  23.      A.   Enables up to 120 characters to be imported back into a
  24.           WordPerfect variable from an outside program or process. 
  25.           This information may consist of such items as:
  26.  
  27.           1)   A computational result
  28.           2)   A data base element retrieved by an external
  29.                program.
  30.           3)   The location and name of a results file produced by
  31.                an external program to enable its immediate
  32.                importation to WordPerfect.
  33.           4)   The optimal location (i.e., drive) to which to
  34.                export a file in terms of space availability,
  35.                proximity of similar files, etc.  (This information
  36.                could be quickly determined by external utilities
  37.                and returned to a macro that would then write out
  38.                the file.)
  39.           5)   The status of the system and its peripherals.
  40.  
  41.      B.   While obtaining information such as that described above
  42.           by manually executing the necessary processes and typing
  43.           in the information to be brought back to WordPerfect
  44.           would be very useful in some circumstances, even more
  45.           exciting possibilities lie in automating such a process
  46.           through a combination of macros, batch files, and
  47.           external programs.  For example, each of the categories
  48.           of information listed under A (above) could be generated
  49.           and retrieved automatically for use in the preparation,
  50.           storage, and reproduction of documents.
  51.         The data to be brought back from external processes
  52.       may be entered either manually on the command line of the
  53.       .exe program that accomplishes the importation, or the name
  54.       of a file containing the data may alternatively be entered.
  55.  
  56.      C.   Two forms of the external importation program, AutoBak.exe
  57.       and USendBak.exe, allow the user the choice of either being
  58.       automatically returned to WordPerfect after the data is
  59.       imported or having the option to issue the necessary EXIT
  60.       command at any point desired after the data is imported.
  61.  
  62. 4.   Installation:
  63.  
  64.           Installing BringBak.wpm requires no more than copying the
  65.      latter file plus SetNV.wpm, ParseNV.wpm, AutoBak.exe, and
  66.      USendBak.exe to the directory where your WordPerfect macros are
  67.      located.  UsendBak.exe has to be in the subdirectory where your
  68.      macros reside in order for the EditWP macro editing system to work
  69.      properly.
  70.  
  71. 5.   Operation:
  72.  
  73.      A.   The BringBak.wpm macro performs important but much less
  74.       difficult tasks than AutoBak.exe and USendBak.exe.
  75.       Specifically, it sets aside an area of memory to receive
  76.       the outside information and it truncates the information
  77.       received in that area to minimum size and assigns it to the
  78.       variable NewVar.  You may, therefore, execute the BringBak
  79.       macro directly or you may have another macro chain or nest to
  80.           it, presumably with the idea of acting upon the
  81.           information returned in NewVar.
  82.  
  83.      B.   Executing the BringBak macro puts you in a DOS shell.  At
  84.           that point you (or a batch file) will execute some
  85.           outside process and produce a result or file name or some
  86.           code that is to be sent back to WordPerfect.  This
  87.       information must be kept to 120 characters or less.
  88.  
  89.      C.   The importation of the information back into WordPerfect is
  90.       accomplished by either of two .exe programs: AutoBak.exe or
  91.       USendBak.exe.  The only difference between these programs is
  92.       whether or not they automatically issue an EXIT command upon
  93.       their termination.  AutoBak.exe issues an EXIT, causing an
  94.       immediate attempt to return to WordPerfect from a DOS shell
  95.       upon the program's termination.  USendBak.exe does NOT issue
  96.       an EXIT command upon termination.  Return to DOS from a SHELL
  97.       must, therefore, be explicitly directed by the user or by a
  98.       batch file from which the USendBak program was executed.
  99.         Use AutoBak.exe when you've invoked a DOS shell from
  100.       WordPerfect, not just issued a DOS command.  Save it as the
  101.       last command to be executed in the SHELL and use it to return
  102.       to WordPerfect.  Use USendBak.exe when you've invoked a single
  103.       DOS command to execute a batch file and you want to control
  104.       when the batch file returns control to WordPerfect.
  105.  
  106.      D.   Data is returned to WordPerfect via either .exe program in one
  107.       of two ways:
  108.         1) It is typed in by the user directly on the command line.
  109.            (e.g., AUTOBAK This is the data I want to bring back.)
  110.         2) A file name, preceded by an @ sign, is entered on the
  111.            command line to designate the file holding the data
  112.            to be imported. (e.g., USENDBAK @d:\stats\means)
  113.       Either of the above ways of specifying the data to be returned
  114.       may be entered on the .exe program's command line in any of
  115.       the following ways:
  116.         1) manually typed in by the user
  117.         2) written to the line in a batch file following the commands
  118.            for the external processes that are generating the data
  119.            to be brought back.
  120.         3) in the case of an @filename, the filename may always
  121.            be the same or it may be passed as an argument in the
  122.            DOS command issued from WordPerfect.
  123.  
  124.      E.   The SetNV.wpm and ParseNV.wpm macros allow you to set up an
  125.       importation variable from within another macro, bring back up
  126.       to 120 bytes of data and put it in NewVar, and use the data
  127.       in NewVar for any purposes that the parent macro may require.
  128.       One big difference from simply {NEST}ing to BringBak.wpm is
  129.       that SetNV sets up the importation variable without proceeding
  130.       immediately with a SHELL to DOS. Thus, the type of SHELL and,
  131.       if it is a single DOS command execution, the specific command
  132.       and the arguments it contains is completely under user control.
  133.       The other difference is that, upon return from the external
  134.       process, no messages or prompts are issued, and the actions
  135.       taken, even in the case of failure to obtain the data sought,
  136.       are completely under user control.
  137.         The most common use of these macros will likely be
  138.       their invocation at desired points in other macros via {NEST}
  139.       commands.  All that is required to invoke these macros is the
  140.       issuance of the following commands at the desired points within
  141.       a macro:
  142.                 {NEST}SetNV~
  143.                 {NEST}ParseNV~
  144.         It should be noted that ParseNV.wpm contains a commented
  145.       section which indicates that commands may be specifically entered
  146.       in that section to govern the action to be taken in the event
  147.       that no data is returned.  Also, although these macros weren't
  148.       specifically used, most of their content was used in the portion
  149.       of the EditWP.wpm macro that controls the SHELL to the external
  150.       macro compilation program.  This is a good example of the utility
  151.       of these macros.
  152.  
  153. 6.   Technical support:
  154.  
  155.      Free technical support will be furnished to any licensed user
  156.      who calls on weekdays during the hours from 9:00 a.m. to 5:00 p.m.
  157.      (Eastern) at the following number:  (919) 643-3492
  158.  
  159.      We may also be reached by mail at:
  160.  
  161.      Performance Sciences International
  162.      Suite 1250
  163.      3001 Latta Drive
  164.      Summerfield, NC  27358
  165.